package cn.com.wangluotongxin.chat.model.constants;

public enum MessageInfoBusinessType {
    MERCHANTS(1, "商户信息", "商户申请");

    private Integer code;

    public Integer getCode() {
        return code;
    }

    private String name;

    public String getName() {
        return name;
    }

    private String title;

    public String getTitle() {
        return title;
    }

    public static MessageInfoBusinessType getByCode(Integer code){
        if(code == null){
            return null;
        }else {
            MessageInfoBusinessType[] businessTypes = values();
            for(MessageInfoBusinessType businessType : businessTypes){
                if(businessType.getCode().equals(code)){
                    return businessType;
                }
            }
        }
        return null;
    }

    MessageInfoBusinessType(Integer code, String name, String title){
        this.code = code;
        this.name = name;
        this.title = title;
    }
}
